import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
	{
		path: '/home',
		name: 'Home',
		component: () => import('../views/home.vue')
	},
	{
		path: '/course',
		name: 'Course',
		component: () => import('../views/course.vue')
	},
	{
		path: '/assist',
		name: 'Assist',
		component: () => import('../views/assist.vue')
	},
	{
		path: '/vip',
		name: 'Vip',
		component: () => import('../views/vip.vue')
	},
	{
		path: '/my',
		name: 'My',
		component: () => import('../views/my.vue')
	},
	{
		path: '/mycenter',
		name: 'MyCenter',
		component: () => import('../views/mycenter.vue')
	},
	{
		path: '/assdetails/:id',
		name: 'AssDetails',
		component: () => import('../views/assdetails.vue')
	},
	{
		path: '/',
		redirect: '/home'
	}
]

const router = new VueRouter({
	/* mode: 'history', */
	base: process.env.BASE_URL,
	routes
})

export default router
